home *** CD-ROM | disk | FTP | other *** search
- Path: sol.caps.maine.edu!bensh
- From: bensh@gandalf.UMCS.Maine.EDU (Shawn Benn)
- Newsgroups: comp.lang.c
- Subject: A solution and another pointer question
- Date: 29 Mar 1996 20:31:16 GMT
- Organization: University of Maine, Department of Computer Science
- Distribution: world
- Message-ID: <4jhhak$131a@sol.caps.maine.edu>
- NNTP-Posting-Host: gandalf.umcs.maine.edu
-
- Hey, all! Thanks to everyone who sent me an e-mail on my last problem. It
- ended up being that I was changing cls and not *cls. I fixed this problem
- after many hours of starting and experimentation. But I have another problem
- that I am hoping you can make light of.
-
- I am trying to seek to the end of a binary file that I opened in the parent
- function. From this I want to find out how many bytes are in the file and
- use that value to read in the data. Here's the syntax I am using:
-
- FILE* fil;
- char* filename = "junk"; /* junk used just as an example */
-
- fil = fopen(filename, "rb");
- fseek(fil, 0L, SEEK_END);
-
- I get a Segmentation Fault error here trying to get to the end of the file.
-
- Any ideas? Thanks again for any help.
-
- Shawn Benn
- University of Maine
-